﻿using Supermarket;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace XLSupermarket.Financial.Prompt_information
{
    public partial class Prompt_information : Form
    {
        public Prompt_information()
        {
            InitializeComponent();
        }

        private void Prompt_information_Load(object sender, EventArgs e)
        {
            string sql = "select DATEDIFF(DAY,GETDATE(),DATEADD(DAY,QualityGuaranteePeriod,DateOfManufacture)) 剩余日期,DATEADD(DAY,QualityGuaranteePeriod,DateOfManufacture) 到期时间,gw.Trade_Name 商品名称,gt.GoodsType_Name 商品类型,gw.Bar_code 商品条形码,Purchase_time 进货时间,DateOfManufacture 生产日期,QualityGuaranteePeriod 保质期,gw.Number 数量,gw.Purchase_price 商品进价, mi.Retail_Price 零售价,mi.Membership_Price 会员价,s.Supplier_Name 供货商名称 from Goods_Warehousing gw,Goods_Type gt ,Merchandise_inventory mi,Supplier s where gw.GoodsType_ID = gt.GoodsType_ID and mi.Bar_code = gw.Bar_code and s.Supplier_ID = gw.Supplier_ID order by 到期时间 asc";
            this.dataGridView1.DataSource = DBHelper.FillData(sql);
        }
    }
}
